<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!doctype html>
<html>
<head>
	<title>群发信息管理</title>

	<script type="text/javascript">
		var pageListUrl = "<c:url value="/announcement/list" />";
		var loadByIdUrl = "<c:url value="/announcement/load/" />";
		var saveUrl = "<c:url value="/announcement/save" />";
		var delByIdUrl = "<c:url value="/announcement/del/" />";

		var detailTbodyTemplateID = "detailTbodyTemplate";
		var detailTbodyID = "detailTbody";
		var pageToolID = "pageTool";

		var editTemplateID = "edit-template";
		var editFormID = "nsForm";
		var searchFormID = "searchForm";


		$(function () {
			toPage(1);
		});

		function toSMS(){
			location ='<c:url value="/announcement/send/${dealerNum}" />';
		}

	</script>

</head>


<body >

<div class="content">
	<div class="title fix">
		<h3 class="b f14 fl">群发信息管理</h3>
		<div class="btns fr">
			<%--<button class="green" onclick="add()">新增</button>--%>
			<button class="orange" onclick="toSMS()">返回</button>
		</div>
	</div>

	<div class="main">
		<div class="inquiry">
			<form id="searchForm">
				<input type="hidden" name="currentPage" value="1">
				<input type="hidden" name="toolStyle" value="pms">
				<input type="hidden" name="limit" value="10">
				<input type="hidden" name="method" value="toPage">
				<input type="hidden" name="dealerNum" value="${dealerNum}">

				<%--<div class="group"><label>活动名称：</label><input type="text" name="name" value=" " /></div>--%>
				<%--<div class="group"><label>活动时间：</label><input type="text" name="name" value=" " /> - <input type="text" name="name" value=" " /></div>--%>
				<%--<div class="group"><label>活动状态：</label><input type="text" name="name" value=" " /></div>--%>
				<%--<div class="btns"><button type="button" class="bottleGreen vm" onclick="toPage(1)">查看</button></div>--%>
			</form>
			<div class="btns " style="width: 100%;">
				<button class="green" onclick="add()">新增</button>
				<%--<button class="orange">返回</button>--%>
			</div>
		</div>
		<div class="table">
			<table width="100%">
				<thead>
				<tr>
					<%--<th width="5%"><input type="checkbox" name="name" value=" " /></th>--%>
					<th width="50">序号</th>
					<th width="">信息内容</th>
					<th width="">修改时间</th>
					<th width="100">操作</th>
				</tr>
				</thead>
				<tbody id="detailTbody" class="detailTr"></tbody>
			</table>
		</div>

		<div class="pageTool" id="pageTool"></div>
	</div>
</div>
<script id="detailTbodyTemplate" type="text/html">
	{{each items as v i}}
	<tr id="{{v.id}}" >
		<td>{{start + i + 1}}</td>
		<td>{{v.content}}</td>
		<td>{{v.lastUpdateDate}}</td>
		<td class="operate_td">
			<a href='javascript:void(0);' onclick="edit('{{v.id}}')">编辑</a>
			<a href='javascript:void(0);' onclick="del('{{v.id}}')">删除</a>
		</td>
	</tr>
	{{/each}}
	{{if items.length == 0}}
	<tr>
		<td colspan="7" class="none-data-tip">没有相关数据</td>
	</tr>
	{{/if}}
</script>


<script id="edit-template" type="text/html">
	<form id="nsForm" method="post" class="form-box">
		<input type="hidden" name="id" value="{{id}}"/>
		<input type="hidden" name="dealerNum" value="${dealerNum}"/>

		<div class="box-body">

			<div class="form-group">
				<label>信息内容：</label>
				<textarea rows="3" name="content" placeholder="请输入信息内容 ...">{{content}}</textarea>
			</div>

		</div>

	</form>

</script>
</body>
</html>




